<template>
	<u-popup :show="show" mode="center" round="20">
		<view class="model">
			<view class="title">温馨提示</view>
			<view class="con">为了更好地保障您的合法权益，请您阅读并同意
				<text class="text" v-for="item,index in con" @click="goUrl(item)">《{{item.text}}》</text>
			</view>
			<view class="agree" @click="agree">
				同意并继续
			</view>
			<view class="noagree" @click="handelClose">
				不同意
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		name:"agree-model",
		props:{
			show: {
			  type: Boolean,
			  default: false
			},
			con:{
				type: Array,
				default:[]
			}
		},
		data() {
			return {
				isShow:true
			};
		},
		watch:{
			show(n){
				console.log('show',n)
				this.isShow = n
			}
		},
		methods:{
			goUrl(item){
				uni.navigateTo({
					url:'/subpages/platform/about-platform/about-platform?title='+item.text+'&type=' + item.url
				})
			},
			handelClose(){
				this.$emit('close')
			},
			agree(){
				this.$emit('close',true)
			},
		}
	}
</script>

<style scoped lang="scss">
	.model{
		width: 600rpx;
		padding: 40rpx;
		padding-bottom: 40rpx;
		box-sizing: border-box;
		
		.title{
			font-weight: bold;
			text-align: center;
			margin-bottom: 25rpx;
		}
		
		.con{
			font-size: 28rpx;
			
			.text{
				color: #FF7681;
			}
		}
		
		.agree,.noagree{
			width: 500rpx;
			margin: 20rpx auto 0;
			line-height: 80rpx;
			border-radius: 80rpx;
			text-align: center;
			text-align: center;
		}
		
		.agree{
			color: #fff;
			background: #FF7681;
			margin-top: 40rpx;
		}
	}
</style>